1. Field of the Invention
The invention relates in general to a method for processing an image, and more particularly to a method for processing an image in order to enhance the contrast of an image in a frame.
2. Description of the Related Art
In a conventional method for processing an image in order to enhance the contrast of an image, the contrast of the frame image is adjusted according to the calculated amount of gray levels of each pixel in a frame. However, the above method can only enhance the contrast of the frame image under certain circumstances. Under the circumstances when the contrast of the frame image needs to be enhanced most, for example, when watching a DVD film, the conventional image processing method for enhancing the contrast may display image with very poor quality. Referring to FIG. 1, a frame of a DVD film is shown. When a DVD film is played, the frame 100 is normally displayed in a ratio of 16:9, hence resulting in a black band in both the upper part UP and the lower part DP of the frame 100 (for example, an LCD screen). Thus, when the conventional image processing method for enhancing the contrast enhances the contrast of the frame 100, the gray levels in the black frame of both the upper part UP and the lower part DP are included, causing the contrast-enhanced frame 100 to be unnatural. Besides, when the gray level curve of the current frame widely differs with the gray level curve of the previous frame, the conventional image processing method for enhancing the contrast would result in image glittering.
Therefore, how to enhance the contrast of the image and at the same time maintain the natural characteristics of the image and avoid image glittering has become an imminent challenge to be solved.